<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
</body>
<script>
    var i = 1;
    for(i;i<=6;i++) //这里就用到了循环
    {
        if (i==3) {             //这里就用到了判断
            document.write("<h3>"+"三级标题"+"</h3>")
            //z这是那个特殊的情况
        }
        else
        document.write("<h"+i+">"+i+"级标题</h"+i+">")
    }   //这是一般的情况
    </script>

</html>